<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Create Order</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link th:href="@{css/bootstrap.css}" type="text/css" rel="stylesheet" media="all">
    <link th:href="@{css/style.css}" type="text/css" rel="stylesheet" media="all">
    <script th:src="@{js/jquery-3.4.1.js}"></script>
    <link th:href='@{fonts/Aladin-Fonts.css}' rel='stylesheet' type='text/css'/>
    <link th:href="@{css/animate.css}" rel="stylesheet" type="text/css" media="all">
    <link rel="stylesheet" th:href="@{css/element.css}">
    <script th:src="@{js/vue.js}"></script>
    <script th:src="@{js/element.js}"></script>
    <script th:src="@{js/axios.js}"></script>
    <script th:src="@{js/dataParse.js}"></script>
    <style>
        .text {
            font-size: 14px;
        }

        .item {
            margin-bottom: 18px;
        }

        .clearfix:before,
        .clearfix:after {
            display: table;
            content: "";
        }

        .clearfix:after {
            clear: both
        }

        .box-card {
            width: 480px;
        }
    </style>
</head>
<body>
<!--banner-->
<div class="banner about-bnr">
    <div class="bnr-img">
        <img class="wow fadeInLeftBig animated" data-wow-delay=".5s" src="images/a.png" alt=""/>
    </div>
    <div th:replace="top-list.html"></div>
    <div class="banner-text">
        <h1 class="wow fadeInDown animated" data-wow-delay=".5s"><a th:href="@{index}">POI - Coffee </a></h1>
        <h2 class="wow fadeInUp animated" data-wow-delay=".5s"><a th:href="@{index}">主页</a> / 创建订单</h2>
    </div>
    <div class="clearfix"></div>
</div>
<!--//banner-->
<!-- gallery -->
<div id="app" style="margin-bottom: 200px">
    <div class="container" style="margin-top: 20px; position: relative;">
        <h4 class="title">CREATE-ORDER</h4>
        <h3 class="title1">START <span>YOUR</span>COFFEE JOURNEY</h3>
        <corder></corder>
    </div>
</div>
<template id="corder">
    <div>
        <el-select v-model="value" placeholder="请选择收货地址" v-if="address.length > 0" style="width:100%">
            <el-option
                    v-for="item in address"
                    :key="item.aid"
                    :label="addressHandle(item)"
                    :value="item.aid">
            </el-option>
        </el-select>
        <el-table
                :data="orderInFo"
                stripe
                style="width: 100%">
            <el-table-column
                    prop="commodity.yname"
                    label="商品名称"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="cnum"
                    label="数量"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="commodity.yprice"
                    label="单价">
            </el-table-column>
            <el-table-column label="小计">
                <template slot-scope="scope">
                    {{scope.row.commodity.yprice * scope.row.cnum | showPrice}}
                </template>
            </el-table-column>
            <el-table-column
                    align="right">
                <template slot-scope="scope" slot="header">
                    <el-button plain
                               size="mini"
                               @click="createOrder()"
                               :disabled="value === '' "
                    >提 交 订 单
                    </el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>
<div th:replace="fotter-all.html"></div>
<script th:src="@{js/createOrder.js}">
</script>
</body>
</html>
